package org.testing;

import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.easypeas.annotations.Accessor;
import org.easypeas.annotations.EasyPea;
import org.easypeas.annotations.View;

/**
 *
 * @author S Owen
 */
@EasyPea(name="shape")
public class Shape {
    
    @Accessor(name="circle")
    public Object getCircle() {
        return new Circle();
    }

    @Accessor(name="square")
    public Object getSquare() {
        return new Square();
    }
    
    @EasyPea(name="square")
    static public class Square {
        @View(name="name", template="/shape/name.vm")
        public void getName(HttpServletRequest request, HttpServletResponse resp, Map<String,Object> map) {
            map.put("name","square");
        }
    }
    
}
